/**
 * 地图核心配置常量
 * @description 包含地图初始化、控件、罗盘、地形等核心配置
 */
import * as mars3d from 'mars3d'
// 地图基础配置
export const MAP_CONFIG = {
  // 场景配置
  scene: {
    showSun: true,
    showMoon: true,
    showSkyBox: true,
    showSkyAtmosphere: false,
    fog: true,
    fxaa: true,
    globe: {
      showGroundAtmosphere: false,
      depthTestAgainstTerrain: false,
      baseColor: "#546a53",
    },
    mapProjection: mars3d.CRS.EPSG3857,
    mapMode2D: mars3d.Cesium.MapMode2D.INFINITE_SCROLL
  },
  // 相机控制配置
  cameraController: {
    zoomFactor: 3.0,
    minimumZoomDistance: 1,
    maximumZoomDistance: 50000000,
    enableRotate: true,
    enableZoom: true,
  },
  // 动画配置
  animationConfig: {
    enableInertia: false,
    enableRotation: true,
    inertiaSpin: 0,
    inertiaTranslate: 0,
    inertiaZoom: 0,
    zoomEventDelay: 0
  }
};

// 控件配置
export const CONTROL_CONFIG = {
  baseLayerPicker: false,
  homeButton: false,
  sceneModePicker: false,
  navigationHelpButton: false,
  fullscreenButton: false,
  contextmenu: { hasDefault: true }
};

// 罗盘配置
export const COMPASS_CONFIG = {
  enabled: true,
  className: "mars3d-compass",
  rotation: false,
  outerSvg: `<svg width="100%" height="100%" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
    <circle cx="50" cy="50" r="45" fill="none" stroke="#48b" stroke-width="2"/>
  </svg>`,
  innerSvg: `<svg width="100%" height="100%" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
    <polygon points="50,20 60,50 50,80 40,50" fill="#48b"/>
  </svg>`
};

// 地形配置
export const TERRAIN_CONFIG = {
  url: "/digitalSentinel/uploadPath/hebei-dixing-13",
  show: true,
};
